#pragma once
#ifndef __ZOOM__WIDGET__INCLUDED__HH__
#define __ZOOM__WIDGET__INCLUDED__HH__

#include <qwidget.h>
#include <qslider.h>
#include <qlabel.h>
#include <qboxlayout.h>
#include <qdockwidget.h>
#include <qicon.h>

class QZoomWidget : public QWidget
{
	Q_OBJECT

protected:
	QLabel* mIcon1, *mIcon2;
	QSlider* mSlider;
	QHBoxLayout * mLay;

public:
	QZoomWidget( QWidget*parent ): QWidget( parent ){
		mLay = new QHBoxLayout(this);
		setLayout(mLay);

		mIcon1 = new QLabel(this);
		mIcon2 = new QLabel(this);
		mSlider = new QSlider( Qt::Horizontal, this );
		
		mLay->addWidget( mIcon1 );
		mLay->addWidget( mSlider );
		mLay->addWidget( mIcon2 );

		mIcon1->setPixmap( QIcon(":/Resources/ZoomIn.png").pixmap(16,16) );
		mIcon2->setPixmap( QIcon(":/Resources/ZoomOut.png").pixmap(16,16) );

		mSlider->setRange( 0, 100.0 );

		connect( mSlider, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int)) );
	}
	~QZoomWidget(){}
	
	QHBoxLayout * layout() const{ return mLay; }

	signals:
		void valueChanged(int val);
};

#endif